<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * SiteOrderHotelReservation.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class SiteOrderHotelReservation extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('site_order_hotel_reservation', function (Blueprint $table) {
            $table->bigIncrements('id');//BigID unsigned
            $table->bigInteger('order_id')->unsigned();//订单ID
            $table->string('hotel_name');// 酒店名称
            $table->string('reservation_no');// 预定编号
            $table->string('room_type_name');// 房间类型名称
            $table->decimal('room_price',19,4);// 房间价格
            $table->float('room_number');// 预定房间数量
            $table->dateTime('check_in_date');// 入住日期
            $table->dateTime('check_out_date');// 退房日期
            $table->string('remark')->default('');// 备注描述

            // 注意时间戳位数
            $table->timestamps();

            // index
            $table->unique('order_id');
            $table->unique('reservation_no');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('site_order_hotel_reservation');
    }
}